home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / whatsm / numform.frm < prev    next >
Text File  |  1996-06-12  |  12KB  |  524 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H00FFFFFF&
  4.    Caption         =   "What's My Number?"
  5.    ClientHeight    =   4575
  6.    ClientLeft      =   1245
  7.    ClientTop       =   1755
  8.    ClientWidth     =   7695
  9.    Height          =   5265
  10.    Icon            =   NUMFORM.FRX:0000
  11.    Left            =   1185
  12.    LinkMode        =   1  'Source
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    ScaleHeight     =   4575
  16.    ScaleWidth      =   7695
  17.    Top             =   1125
  18.    Width           =   7815
  19.    Begin CommandButton Command1 
  20.       Caption         =   "Give up"
  21.       Height          =   735
  22.       Left            =   1440
  23.       TabIndex        =   8
  24.       Top             =   3600
  25.       Width           =   1455
  26.    End
  27.    Begin CommandButton OK 
  28.       Caption         =   "OK"
  29.       Default         =   -1  'True
  30.       Height          =   735
  31.       Left            =   5520
  32.       TabIndex        =   2
  33.       Top             =   1080
  34.       Width           =   1575
  35.    End
  36.    Begin TextBox Text1 
  37.       FontBold        =   0   'False
  38.       FontItalic      =   0   'False
  39.       FontName        =   "Times New Roman"
  40.       FontSize        =   24
  41.       FontStrikethru  =   0   'False
  42.       FontUnderline   =   0   'False
  43.       Height          =   735
  44.       Left            =   3240
  45.       TabIndex        =   0
  46.       Top             =   1080
  47.       Width           =   1935
  48.    End
  49.    Begin Label Label5 
  50.       BackColor       =   &H00FFFFFF&
  51.       FontBold        =   0   'False
  52.       FontItalic      =   0   'False
  53.       FontName        =   "Times New Roman"
  54.       FontSize        =   24
  55.       FontStrikethru  =   0   'False
  56.       FontUnderline   =   0   'False
  57.       Height          =   495
  58.       Left            =   5160
  59.       TabIndex        =   5
  60.       Top             =   3720
  61.       Width           =   615
  62.    End
  63.    Begin Label Label4 
  64.       BackColor       =   &H00FFFFFF&
  65.       Caption         =   "Turns:"
  66.       FontBold        =   0   'False
  67.       FontItalic      =   0   'False
  68.       FontName        =   "Times New Roman"
  69.       FontSize        =   24
  70.       FontStrikethru  =   0   'False
  71.       FontUnderline   =   0   'False
  72.       Height          =   495
  73.       Left            =   3600
  74.       TabIndex        =   4
  75.       Top             =   3720
  76.       Width           =   1455
  77.    End
  78.    Begin Label Label3 
  79.       Alignment       =   2  'Center
  80.       BackColor       =   &H00FFFFFF&
  81.       FontBold        =   -1  'True
  82.       FontItalic      =   0   'False
  83.       FontName        =   "Times New Roman"
  84.       FontSize        =   24
  85.       FontStrikethru  =   0   'False
  86.       FontUnderline   =   0   'False
  87.       Height          =   615
  88.       Left            =   840
  89.       TabIndex        =   6
  90.       Top             =   2160
  91.       Width           =   5775
  92.    End
  93.    Begin Label Label1 
  94.       BackColor       =   &H00FFFFFF&
  95.       Caption         =   "Enter your guess in the box to the right, then press Enter."
  96.       Height          =   495
  97.       Left            =   480
  98.       TabIndex        =   1
  99.       Top             =   1200
  100.       Width           =   2535
  101.    End
  102.    Begin Label Label6 
  103.       BackColor       =   &H00FFFFFF&
  104.       Caption         =   "1000"
  105.       FontBold        =   -1  'True
  106.       FontItalic      =   0   'False
  107.       FontName        =   "MS Sans Serif"
  108.       FontSize        =   12
  109.       FontStrikethru  =   0   'False
  110.       FontUnderline   =   0   'False
  111.       ForeColor       =   &H00000000&
  112.       Height          =   375
  113.       Left            =   5880
  114.       TabIndex        =   7
  115.       Top             =   480
  116.       Width           =   1095
  117.    End
  118.    Begin Label Label2 
  119.       BackColor       =   &H00FFFFFF&
  120.       Caption         =   "Please choose a number between 1 and "
  121.       FontBold        =   -1  'True
  122.       FontItalic      =   0   'False
  123.       FontName        =   "MS Sans Serif"
  124.       FontSize        =   12
  125.       FontStrikethru  =   0   'False
  126.       FontUnderline   =   0   'False
  127.       ForeColor       =   &H00000000&
  128.       Height          =   375
  129.       Left            =   960
  130.       TabIndex        =   3
  131.       Top             =   480
  132.       Width           =   4935
  133.    End
  134.    Begin Menu file 
  135.       Caption         =   "&Game"
  136.       Begin Menu new 
  137.          Caption         =   "&New"
  138.          Shortcut        =   {F2}
  139.       End
  140.       Begin Menu ex 
  141.          Caption         =   "E&xit"
  142.          Shortcut        =   ^X
  143.       End
  144.       Begin Menu dash 
  145.          Caption         =   "-"
  146.          Index           =   2
  147.       End
  148.       Begin Menu abt 
  149.          Caption         =   "&About WM#?..."
  150.       End
  151.    End
  152.    Begin Menu options 
  153.       Caption         =   "&Options"
  154.       Begin Menu highlow 
  155.          Caption         =   "&Higher/Lower"
  156.          Checked         =   -1  'True
  157.       End
  158.       Begin Menu hotcold 
  159.          Caption         =   "Hot/&Cold"
  160.       End
  161.       Begin Menu dasher 
  162.          Caption         =   "-"
  163.          Index           =   1
  164.       End
  165.       Begin Menu boundaries 
  166.          Caption         =   "&Set Boundaries..."
  167.       End
  168.       Begin Menu colorscheme 
  169.          Caption         =   "&Background Color"
  170.          Begin Menu green 
  171.             Caption         =   "&Green"
  172.          End
  173.          Begin Menu blue 
  174.             Caption         =   "&Blue"
  175.          End
  176.          Begin Menu red 
  177.             Caption         =   "&Red"
  178.          End
  179.          Begin Menu yellow 
  180.             Caption         =   "&Yellow"
  181.          End
  182.          Begin Menu purple 
  183.             Caption         =   "&Purple"
  184.          End
  185.          Begin Menu bluegray 
  186.             Caption         =   "Bl&ue-Gray"
  187.          End
  188.          Begin Menu gray 
  189.             Caption         =   "Gr&ay"
  190.          End
  191.          Begin Menu white 
  192.             Caption         =   "&White"
  193.             Checked         =   -1  'True
  194.          End
  195.       End
  196.    End
  197.    Begin Menu help 
  198.       Caption         =   "&Help"
  199.    End
  200. End
  201. Sub about_Click ()
  202. Load about
  203. about.Show
  204. End Sub
  205.  
  206. Sub abt_Click ()
  207. Load about
  208. about.Show
  209. End Sub
  210.  
  211. Sub blue_Click ()
  212. green.checked = 0
  213. blue.checked = -1
  214. red.checked = 0
  215. yellow.checked = 0
  216. purple.checked = 0
  217. bluegray.checked = 0
  218. gray.checked = 0
  219. white.checked = 0
  220.  
  221. h = &HFFFF00
  222. form1.backColor = h
  223. label1.backColor = h
  224. label2.backColor = h
  225. label3.backColor = h
  226. label4.backColor = h
  227. label5.backColor = h
  228. label6.backColor = h
  229.  
  230. End Sub
  231.  
  232. Sub bluegray_Click ()
  233. green.checked = 0
  234. blue.checked = 0
  235. red.checked = 0
  236. yellow.checked = 0
  237. purple.checked = 0
  238. bluegray.checked = -1
  239. gray.checked = 0
  240. white.checked = 0
  241.  
  242. h = &H808000
  243. form1.backColor = h
  244. label1.backColor = h
  245. label2.backColor = h
  246. label3.backColor = h
  247. label4.backColor = h
  248. label5.backColor = h
  249. label6.backColor = h
  250.  
  251. End Sub
  252.  
  253. Sub boundaries_Click ()
  254. message$ = "Pick a number between 1 and:"
  255. response$ = InputBox$(message$, "What's My Number?", label6.caption)
  256. If response$ = "" Then response$ = label6.caption
  257. t = Val(response$)
  258. label6.caption = Str$(t)
  259. Randomize
  260. x = Int(t * Rnd + 1)
  261. label5.caption = ""
  262. label3.caption = ""
  263. text1.enabled = -1
  264. OK.enabled = -1
  265. turns = 0
  266. command1.enabled = -1
  267. End Sub
  268.  
  269. Sub Command1_Click ()
  270. command1.enabled = 0
  271. text1.enabled = 0
  272. OK.enabled = 0
  273. label3.caption = ""
  274. w$ = "The number was " + Str$(x)
  275. MsgBox w$, 64, "Chicken!!!"
  276. End Sub
  277.  
  278. Sub ex_Click ()
  279. label4.caption = ""
  280. label5.caption = ""
  281. label3.caption = ""
  282. Unload form1
  283. End Sub
  284.  
  285. Sub Form_Click ()
  286. If about.visible = -1 Then
  287.     Beep
  288.     about.Show
  289. End If
  290.  
  291. End Sub
  292.  
  293. Sub Form_Load ()
  294. t = 1000
  295. Randomize
  296. x = Int(t * Rnd + 1)
  297. End Sub
  298.  
  299. Sub gray_Click ()
  300. green.checked = 0
  301. blue.checked = 0
  302. red.checked = 0
  303. yellow.checked = 0
  304. purple.checked = 0
  305. bluegray.checked = 0
  306. gray.checked = -1
  307. white.checked = 0
  308.  
  309. h = &HC0C0C0
  310. form1.backColor = h
  311. label1.backColor = h
  312. label2.backColor = h
  313. label3.backColor = h
  314. label4.backColor = h
  315. label5.backColor = h
  316. label6.backColor = h
  317.  
  318. End Sub
  319.  
  320. Sub green_Click ()
  321.  
  322. green.checked = -1
  323. blue.checked = 0
  324. red.checked = 0
  325. yellow.check